<%--
  Created by IntelliJ IDEA.
  User: 123
  Date: 2020/10/9
  Time: 18:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
      <table border="2px"  align="center">
          <tr> <form action="${pageContext.request.contextPath}/User/sss" method="post">
              <td colspan="4"> 搜索:<input type="text" value="${preName}" name="preName"  >
                <input type="submit" value="搜索" >
          </form>
              </td>
          </tr>
        <c:forEach items="${p.list}" var="d">
            <tr>
                <td>${d.id}</td>
                <td>${d.name}</td>
                <td>${d.kill}</td>
                <td><a href="javascript:void(0)"  onclick="t(${d.id})"/>删除</td>
            </tr>
        </c:forEach>
          <a href="${pageContext.request.contextPath}/s.html"> ss</a>
          <tr>
              <td>
                  <c:if test="${p.shangpage}">
                      <a href="${pageContext.request.contextPath}/User/ss_page?p.pageIndex=${p.pre}&preName=${preName}">上一页</a>
                  </c:if>
              </td>
              <td>
                  <c:if test="${p.nextPage}">
                      <a href="${pageContext.request.contextPath}/User/ss_page?p.pageIndex=${p.next}&preName=${preName}">下一页</a>
                  </c:if>
              </td>
          </tr>
      </table>
  <script type="text/javascript">
      function t(id) {
        var a= window.confirm("请确认是否删除")
          alert(a)
          if (a){
              location="${pageContext.request.contextPath}/s.html?id="+id;
          }
      }
  </script>
  </body>
</html>
